package org.eiahe.hr.attendance.domain.bo;

import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.ehe.common.core.validate.AddGroup;
import org.ehe.common.core.validate.EditGroup;
import org.ehe.common.mybatis.core.domain.BaseEntity;
import org.eiahe.hr.attendance.domain.EmployeeShift;

import java.time.LocalDate;

/**
 * 员工-班次关联业务对象
 *
 * @author zhangnn
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = EmployeeShift.class, reverseConvertGenerate = false)
public class EmployeeShiftBo extends BaseEntity {

    /**
     * 主键ID
     */
    @NotNull(message = "ID不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 工号
     */
    @NotBlank(message = "工号不能为空", groups = { AddGroup.class })
    private String employeeNo;

    private String employeeName;

    /**
     * 用户ID
     */
    @NotNull(message = "用户ID不能为空", groups = { AddGroup.class })
    private Long userId;

    /**
     * 班次ID
     */
    @NotNull(message = "班次ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long shiftId;

    /**
     * 生效日期
     */
    @NotNull(message = "生效日期不能为空", groups = { AddGroup.class, EditGroup.class })
    private LocalDate effectiveDate;

    /**
     * 失效日期(空表示永久生效)
     */
    private LocalDate expiryDate;

    /**
     * 状态(0正常 1停用)
     */
    private String status;
}
